﻿@{
    Layout = null;
}
<link href="~/Assets/css/jstree/jstree-style.min.css" rel="stylesheet" />
<link href="~/Assets/css/font-awesome.min.css" rel="stylesheet" />
<script src="~/Assets/js/jstree/jstree.min.js"></script>
<div class="col-sm-6">
    <div class="widget-box">
        <div class="widget-header widget-header-small header-color-dark">
            <h4 class="lighter smaller">
                组织机构列表
            </h4>
            @if (Request.Params["action"] == "edit")
            {
                <div class="widget-toolbar">
                    <div class="btn-group">
                        <button data-toggle="dropdown" class="btn btn-xs dropdown-toggle">
                            <i class="icon-angle-down icon-on-right">
                                添加
                            </i>

                        </button>
                        <ul class="dropdown-menu dropdown-info pull-right">
                            <li>
                                <a href="#" onclick="tree_create('部门');">
                                    <i class="icon-home"></i>
                                    部门
                                </a>
                            </li>

                            <li>
                                <a href="#" onclick="tree_create('单位');">
                                    <i class="icon-group"></i>
                                    单位
                                </a>
                            </li>

                            <li>
                                <a href="#" onclick="tree_create('岗位');">
                                    <i class="icon-coffee"></i>
                                    岗位
                                </a>
                            </li>

                            <li>
                                <a href="#" onclick="tree_create('成员');">
                                    <i class="icon-user"></i>
                                    成员
                                </a>
                            </li>

                        </ul>
                    </div>
                    <div class="btn-group">
                        <button class="btn btn-xs" onclick=" tree_edit()">
                            编辑
                        </button>
                    </div>
                    <div class="btn-group">
                        <button class="btn btn-xs" onclick="tree_rename()">
                            重命名
                        </button>
                    </div>
                    <div class="btn-group">
                        <button class="btn btn-danger btn-xs" onclick="tree_delete()">
                            删除
                        </button>
                    </div>
                </div>
            }
        </div>
        <div class="widget-body">
            <div class="widget-main padding-8">
                <div id="orgTree" class="tree tree-selectable">
                </div>
            </div>
        </div>
    </div>
</div>
@{
    if (Request.Params["action"] == "edit")
    {
        <script src="~/Assets/js/flexflowPage/userrel-edit.js"></script>
    }
    else
    {
        <script src="~/Assets/js/flexflowPage/userrel-list.js"></script>
    }
}